package com.woniuxy.kaer.tenants.controller;


import cn.hutool.core.bean.BeanUtil;
import com.woniuxy.kaer.commons.util.Result;
import com.woniuxy.kaer.tenants.from.TurnoverRecordsFrom;
import com.woniuxy.kaer.tenants.param.TurnoverRecordsParam;
import com.woniuxy.kaer.tenants.service.TransactionLogsService;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 程诗洋
 * @since 2025年02月17日
 */
@RestController
@RequestMapping("/transactionLogs")
public class TransactionLogsController {
    @Resource
    private TransactionLogsService transactionLogsService;
    //商铺流水记录
    @PutMapping ("/MerchantRecords")
    public Result MerchantRecords(@RequestBody TurnoverRecordsFrom from)throws Exception{
        transactionLogsService.MerchantRecords(BeanUtil.toBean(from, TurnoverRecordsParam.class));
        return Result.succeed("商铺流水记录",null);
    }
}

